pub fn new_birthday_probability(n: u32) -> f64 {
    if n > 365 {
        return 1.0; // 如果人数超过365，必然有重复生日
    }

    let mut prob_no_shared = 1.0;
    for i in 0..n {
        prob_no_shared *= (365 - i) as f64 / 365.0;
    }

    // 计算至少有两个相同生日的概率
    1.0 - prob_no_shared
}